{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "9a71fa36",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "source": [
    "# Groupchat with Llamaindex agents\n",
    "\n",
    "[Llamaindex agents](https://docs.llamaindex.ai/en/stable/optimizing/agentic_strategies/agentic_strategies/) have the ability to use planning strategies to answer user questions. They can be integrated in Autogen in easy ways\n",
    "\n",
    "## Requirements"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c528cd6d",
   "metadata": {},
   "outputs": [],
   "source": [
    "%pip install pyautogen llama-index llama-index-tools-wikipedia llama-index-readers-wikipedia wikipedia"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "5ebd2397",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "source": [
    "## Set your API Endpoint"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "dca301a4",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "import autogen\n",
    "\n",
    "config_list = autogen.config_list_from_json(\n",
    "    \"OAI_CONFIG_LIST\",\n",
    "    filter_dict={\"tags\": [\"gpt-3.5-turbo\"]},  # comment out to get all\n",
    ")\n",
    "# When using a single openai endpoint, you can use the following:\n",
    "# config_list = [{\"model\": \"gpt-3.5-turbo\", \"api_key\": os.getenv(\"OPENAI_API_KEY\")}]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "76c11ea8",
   "metadata": {},
   "source": [
    "## Set Llamaindex"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2d3d298e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from llama_index.core import Settings\n",
    "from llama_index.core.agent import ReActAgent\n",
    "from llama_index.embeddings.openai import OpenAIEmbedding\n",
    "from llama_index.llms.openai import OpenAI\n",
    "from llama_index.tools.wikipedia import WikipediaToolSpec\n",
    "\n",
    "llm = OpenAI(\n",
    "    model=\"gpt-3.5-turbo\",\n",
    "    temperature=0.0,\n",
    "    api_key=os.environ.get(\"OPENAPI_API_KEY\", \"\"),\n",
    ")\n",
    "\n",
    "embed_model = OpenAIEmbedding(\n",
    "    model=\"text-embedding-ada-002\",\n",
    "    temperature=0.0,\n",
    "    api_key=os.environ.get(\"OPENAPI_API_KEY\", \"\"),\n",
    ")\n",
    "\n",
    "Settings.llm = llm\n",
    "Settings.embed_model = embed_model\n",
    "\n",
    "# create a react agent to use wikipedia tool\n",
    "wiki_spec = WikipediaToolSpec()\n",
    "# Get the search wikipedia tool\n",
    "wikipedia_tool = wiki_spec.to_tool_list()[1]\n",
    "\n",
    "location_specialist = ReActAgent.from_tools(tools=[wikipedia_tool], llm=llm, max_iterations=10, verbose=True)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "2b9526e7",
   "metadata": {},
   "source": [
    "## Create agents\n",
    "\n",
    "In this example, we will create a Llamaindex agent to answer questions fecting data from wikipedia and a user proxy agent."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "1a10c9fe-1fbc-40c6-b655-5d2256864ce8",
   "metadata": {},
   "outputs": [],
   "source": [
    "from autogen.agentchat.contrib.llamaindex_conversable_agent import LLamaIndexConversableAgent\n",
    "\n",
    "llm_config = {\n",
    "    \"temperature\": 0,\n",
    "    \"config_list\": config_list,\n",
    "}\n",
    "\n",
    "trip_assistant = LLamaIndexConversableAgent(\n",
    "    \"trip_specialist\",\n",
    "    llama_index_agent=location_specialist,\n",
    "    system_message=\"You help customers finding more about places they would like to visit. You can use external resources to provide more details as you engage with the customer.\",\n",
    "    description=\"This agents helps customers discover locations to visit, things to do, and other details about a location. It can use external resources to provide more details. This agent helps in finding attractions, history and all that there si to know about a place\",\n",
    ")\n",
    "\n",
    "user_proxy = autogen.UserProxyAgent(\n",
    "    name=\"Admin\",\n",
    "    human_input_mode=\"ALWAYS\",\n",
    "    code_execution_config=False,\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "966c96a4-cc8a-4400-b8db-a21b7142e33c",
   "metadata": {},
   "source": [
    "Next, let's set up our group chat."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "354b4a8f-7a96-455b-9f17-cbc19d880462",
   "metadata": {},
   "outputs": [],
   "source": [
    "groupchat = autogen.GroupChat(\n",
    "    agents=[trip_assistant, user_proxy],\n",
    "    messages=[],\n",
    "    max_round=500,\n",
    "    speaker_selection_method=\"round_robin\",\n",
    "    enable_clear_history=True,\n",
    ")\n",
    "manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "d5518947",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[33mAdmin\u001b[0m (to chat_manager):\n",
      "\n",
      "\n",
      "What can i find in Tokyo related to Hayao Miyazaki and its moveis like Spirited Away?.\n",
      "\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[32m\n",
      "Next speaker: trip_specialist\n",
      "\u001b[0m\n",
      "\u001b[31m\n",
      ">>>>>>>> USING AUTO REPLY...\u001b[0m\n",
      "> Running step 4f4f291b-5e13-495f-9871-4207e4c4bcb9. Step input: \n",
      "What can i find in Tokyo related to Hayao Miyazaki and its moveis like Spirited Away?.\n",
      "\n",
      "\u001b[1;3;38;5;200mThought: The current language of the user is: English. I need to use a tool to help me answer the question.\n",
      "Action: search_data\n",
      "Action Input: {'query': 'Hayao Miyazaki Tokyo'}\n",
      "\u001b[0m\u001b[1;3;34mObservation: Hayao Miyazaki (宮崎 駿 or 宮﨑 駿, Miyazaki Hayao, Japanese: [mijaꜜzaki hajao]; born January 5, 1941) is a Japanese animator, filmmaker, and manga artist. A founder of Studio Ghibli, he has attained international acclaim as a masterful storyteller and creator of Japanese animated feature films, and is widely regarded as one of the most accomplished filmmakers in the history of animation.\n",
      "Born in Tokyo City in the Empire of Japan, Miyazaki expressed interest in manga and animation from an early age, and he joined Toei Animation in 1963. During his early years at Toei Animation he worked as an in-between artist and later collaborated with director Isao Takahata. Notable films to which Miyazaki contributed at Toei include Doggie March and Gulliver's Travels Beyond the Moon. He provided key animation to other films at Toei, such as Puss in Boots and Animal Treasure Island, before moving to A-Pro in 1971, where he co-directed Lupin the Third Part I alongside Takahata. After moving to Zuiyō Eizō (later known as Nippon Animation) in 1973, Miyazaki worked as an animator on World Masterpiece Theater, and directed the television series Future Boy Conan (1978). He joined Tokyo Movie Shinsha in 1979 to direct his first feature film The Castle of Cagliostro as well as the television series Sherlock Hound. In the same period, he began writing and illustrating the manga Nausicaä of the Valley of the Wind (1982–1994) and directed the 1984 film adaptation produced by Topcraft.\n",
      "Miyazaki co-founded Studio Ghibli in 1985. He directed numerous films with Ghibli, including Laputa: Castle in the Sky (1986), My Neighbor Totoro (1988), Kiki's Delivery Service (1989), and Porco Rosso (1992). The films were met with critical and commercial success in Japan. Miyazaki's film Princess Mononoke was the first animated film ever to win the Japan Academy Film Prize for Picture of the Year, and briefly became the highest-grossing film in Japan following its release in 1997; its distribution to the Western world greatly increased Ghibli's popularity and influence outside Japan. His 2001 film Spirited Away became the highest-grossing film in Japanese history, winning the Academy Award for Best Animated Feature, and is frequently ranked among the greatest films of the 21st century. Miyazaki's later films—Howl's Moving Castle (2004), Ponyo (2008), and The Wind Rises (2013)—also enjoyed critical and commercial success. Following the release of The Wind Rises, Miyazaki announced his retirement from feature films, though he later returned to write and direct his twelfth feature film The Boy and the Heron (2023), for which he won his second Academy Award for Best Animated Feature.\n",
      "Miyazaki's works are characterized by the recurrence of themes such as humanity's relationship with nature and technology, the wholesomeness of natural and traditional patterns of living, the importance of art and craftsmanship, and the difficulty of maintaining a pacifist ethic in a violent world. The protagonists of his films are often strong girls or young women, and several of his films present morally ambiguous antagonists with redeeming qualities. Miyazaki's works have been highly praised and awarded; he was named a Person of Cultural Merit for outstanding cultural contributions in November 2012, and received the Academy Honorary Award for his impact on animation and cinema in November 2014. Miyazaki has frequently been cited as an inspiration for numerous animators, directors, and writers.\n",
      "\n",
      "\n",
      "== Early life ==\n",
      "Hayao Miyazaki was born on January 5, 1941, in Tokyo City, Empire of Japan, the second of four sons. His father, Katsuji Miyazaki (born 1915), was the director of Miyazaki Airplane, his brother's company, which manufactured rudders for fighter planes during World War II. The business allowed his family to remain affluent during Miyazaki's early life. Miyazaki's father enjoyed purchasing paintings and demonstrating them to guests, but otherwise had little known artistic understanding. He said that he was in the Imperial Japanese Army around 1940; after declaring to his commanding officer that he wished not to fight because of his wife and young child, he was discharged after a lecture about disloyalty. According to Miyazaki, his father often told him about his exploits, claiming that he continued to attend nightclubs after turning 70. Katsuji Miyazaki died on March 18, 1993. After his death, Miyazaki felt that he had often looked at his father negatively and that he had never said anything \"lofty or inspiring\". He regretted not having a serious discussion with his father, and felt that he had inherited his \"anarchistic feelings and his lack of concern about embracing contradictions\".\n",
      "\n",
      "Miyazaki has noted that some of his earliest memories are of \"bombed-out cities\". In 1944, when he was three years old, Miyazaki's family evacuated to Utsunomiya. After the bombing of Utsunomiya in July 1945, he and his family evacuated to Kanuma. The bombing left a lasting impression on Miyazaki, then aged four. As a child, Miyazaki suffered from digestive problems, and was told that he would not live beyond 20, making him feel like an outcast. From 1947 to 1955, Miyazaki's mother Yoshiko suffered from spinal tuberculosis; she spent the first few years in hospital before being nursed from home. Yoshiko was frugal, and described as a strict, intellectual woman who regularly questioned \"socially accepted norms\". She was closest with Miyazaki, and had a strong influence on him and his later work. Yoshiko Miyazaki died in July 1983 at the age of 72.\n",
      "Miyazaki began school in 1947, at an elementary school in Utsunomiya, completing the first through third grades. After his family moved back to Suginami-ku, Miyazaki completed the fourth grade at Ōmiya Elementary School, and fifth grade at Eifuku Elementary School, which was newly established after splitting off from Ōmiya Elementary. After graduating from Eifuku as part of the first graduating class, he attended Ōmiya Junior High School. He aspired to become a manga artist, but discovered he could not draw people; instead, he only drew planes, tanks, and battleships for several years. Miyazaki was influenced by several manga artists, such as Tetsuji Fukushima, Soji Yamakawa and Osamu Tezuka. Miyazaki destroyed much of his early work, believing it was \"bad form\" to copy Tezuka's style as it was hindering his own development as an artist. Around this time, Miyazaki would often see movies with his father, who was an avid moviegoer; memorable films for Miyazaki include Meshi (1951) and Tasogare Sakaba (1955).\n",
      "After graduating from Ōmiya Junior High, Miyazaki attended Toyotama High School. During his third and final year, Miyazaki's interest in animation was sparked by Panda and the Magic Serpent (1958), Japan's first feature-length animated film in color; he had sneaked out to watch the film instead of studying for his entrance exams. Miyazaki later recounted that he fell in love with the film's heroine, Bai-Niang, and that the film moved him to tears and left a profound impression; he wrote that he was \"moved to the depths of [his] soul\" and that the \"pure, earnest world of the film\" affirmed a side of him that \"yearned desperately to affirm the world rather than negate it\". After graduating from Toyotama, Miyazaki attended Gakushuin University in the department of political economy, majoring in Japanese Industrial Theory. He joined the \"Children's Literature Research Club\", the \"closest thing back then to a comics club\"; he was sometimes the sole member of the club. In his free time, Miyazaki would visit his art teacher from middle school and sketch in his studio, where the two would drink and \"talk about politics, life, all sorts of things\". Around this time, he also drew manga; he never completed any stories, but accumulated thousands of pages of the beginnings of stories. He also frequently approached manga publishers to rent their stories. In 1960, Miyazaki was a bystander during the Anpo protests, having developed an interest after seeing photographs in Asahi Graph; by that point, he was too late to participate in the demonstrations. Miyazaki graduated from Gakushuin in 1963 with degrees in political science and economics.\n",
      "\n",
      "\n",
      "== Career ==\n",
      "\n",
      "\n",
      "=== Early career ===\n",
      "\n",
      "In 1963, Miyazaki was employed at Toei Animation; this was the last year the company hired regularly. After gaining employment, he began renting a four-and-a-half tatami (7.4 m2; 80 sq ft) apartment in Nerima, Tokyo; the rent was ¥6,000. His salary at Toei was ¥19,500. Miyazaki worked as an in-between artist on the theatrical feature anime Doggie March and the television anime Wolf Boy Ken (both 1963). He also worked on Gulliver's Travels Beyond the Moon (1965). He was a leader in a labor dispute soon after his arrival, and became chief secretary of Toei's labor union in 1964. Miyazaki later worked as chief animator, concept artist, and scene designer on The Great Adventure of Horus, Prince of the Sun (1968). Throughout the film's production, Miyazaki worked closely with his mentor, Yasuo Ōtsuka, whose approach to animation profoundly influenced Miyazaki's work. Directed by Isao Takahata, with whom Miyazaki would continue to collaborate for the remainder of his career, the film was highly praised, and deemed a pivotal work in the evolution of animation. Miyazaki moved to a residence in Ōizumigakuenchō in April 1969, after the birth of his second son.\n",
      "Miyazaki provided key animation for The Wonderful World of Puss 'n Boots (1969), directed by Kimio Yabuki. He created a 12-chapter manga series as a promotional tie-in for the film; the series ran in the Sunday edition of Tokyo Shimbun from January to March 1969. Miyazaki later proposed scenes in the screenplay for Flying Phantom Ship (1969), in which military tanks would cause mass hysteria in downtown Tokyo, and was hired to storyboard and animate the scenes. Under the pseudonym Akitsu Saburō (秋津 三朗), Miyazaki wrote and illustrated the manga People of the Desert, published in 26 installments between September 1969 and March 1970 in Boys and Girls Newspaper (少年少女新聞, Shōnen shōjo shinbun). He was influenced by illustrated stories such as Fukushima's Evil Lord of the Desert (沙漠の魔王, Sabaku no maō). In 1970, Miyazaki moved residence to Tokorozawa. In 1971, he developed structure, characters and designs for Hiroshi Ikeda's adaptation of Animal Treasure Island; he created the 13-part manga adaptation, printed in Tokyo Shimbun from January to March 1971. Miyazaki also provided key animation for Ali Baba and the Forty Thieves.\n",
      "Miyazaki left Toei Animation in August 1971, and was hired at A-Pro, where he directed, or co-directed with Takahata, 23 episodes of Lupin the Third Part I, often using the pseudonym Teruki Tsutomu (照樹 務). The two also began pre-production on a series based on Astrid Lindgren's Pippi Longstocking books, designing extensive storyboards; the series was canceled after Miyazaki and Takahata were unable to meet with Lindgren, and permission was refused to complete the project. In 1972 and 1973, Miyazaki wrote, designed and animated two Panda! Go, Panda! shorts, directed by Takahata. After moving from A-Pro to Zuiyō Eizō in June 1973, Miyazaki and Takahata worked on World Masterpiece Theater, which featured their animation series Heidi, Girl of the Alps, an adaptation of Johanna Spyri's Heidi. Zuiyō Eizō continued as Nippon Animation in July 1975. Miyazaki also directed the television series Future Boy Conan (1978), an adaptation of Alexander Key's The Incredible Tide.\n",
      "\n",
      "\n",
      "=== Breakthrough films ===\n",
      "Miyazaki left Nippon Animation in 1979, during the production of Anne of Green Gables; he provided scene design and organization on the first fifteen episodes. He moved to Telecom Animation Film, a subsidiary of TMS Entertainment, to direct his first feature anime film, The Castle of Cagliostro (1979), a Lupin III film. In his role at Telecom, Miyazaki helped train the second wave of employees. Miyazaki directed six episodes of Sherlock Hound in 1981, until issues with Sir Arthur Conan Doyle's estate led to a suspension in production; Miyazaki was busy with other projects by the time the issues were resolved, and the remaining episodes were directed by Kyosuke Mikuriya. They were broadcast from November 1984 to May 1985. Miyazaki also wrote the graphic novel The Journey of Shuna, inspired by the Tibetan folk tale \"Prince who became a dog\". The novel was published by Tokuma Shoten in June 1983, dramatized for radio broadcast in 1987, and published in English as Shuna's Journey in 2022. Hayao Miyazaki's Daydream Data Notes was also irregularly published from November 1984 to October 1994 in Model Graphix; selections of the stories received radio broadcast in 1995.\n",
      "After the release of The Castle of Cagliostro, Miyazaki began working on his ideas for an animated film adaptation of Richard Corben's comic book Rowlf and pitched the idea to Yutaka Fujioka at TMS. In November 1980, a proposal was drawn up to acquire the film rights. Around that time, Miyazaki was also approached for a series of magazine articles by the editorial staff of Animage. During subsequent conversations, he showed his sketchbooks and discussed basic outlines for envisioned animation projects with editors Toshio Suzuki and Osamu Kameyama, who saw the potential for collaboration on their development into animation. Two projects were proposed: Warring States Demon Castle (戦国魔城, Sengoku ma-jō), to be set in the Sengoku period; and the adaptation of Corben's Rowlf. Both were rejected, as the company was unwilling to fund anime projects not based on existing manga, and the rights for the adaptation of Rowlf could not be secured. An agreement was reached that Miyazaki could start developing his sketches and ideas into a manga for the magazine with the proviso that it would never be made into a film. The manga—titled Nausicaä of the Valley of the Wind—ran from February 1982 to March 1994. The story, as re-printed in the tankōbon volumes, spans seven volumes for a combined total of 1060 pages. Miyazaki drew the episodes primarily in pencil, and it was printed monochrome in sepia-toned ink. Miyazaki resigned from Telecom Animation Film in November 1982.\n",
      "\n",
      "Following the completion of Nausicaä of the Valley of the Wind's first two volumes, Suzuki and the other editors of Animage encouraged Miyazaki to work on a film adaptation; some documentaries claim he began writing the manga after his film pitch was rejected, but Miyazaki said the manga came first. Miyazaki's imagination was sparked by the mercury poisoning of Minamata Bay and how nature responded and thrived in a poisoned environment, using it to create the film's polluted world. By this time, Miyazaki had moved to the animation studio Topcraft and was finding some of the staff to be unreliable. He eventually decided to bring on several of his previous collaborators for the film's production, including Takahata who would serve as producer. Pre-production began on May 31, 1983; Miyazaki encountered difficulties in creating the screenplay, with only sixteen chapters of the manga to work with. Takahata enlisted experimental and minimalist musician Joe Hisaishi to compose the film's score. Nausicaä of the Valley of the Wind was released on March 11, 1984. It grossed ¥1.48 billion at the box office, and made an additional ¥742 million in distribution income. It is often seen as Miyazaki's pivotal work, cementing his reputation as an animator. It was lauded for its positive portrayal of women, particularly that of main character Nausicaä. Several critics have labeled Nausicaä of the Valley of the Wind as possessing anti-war and feminist themes; Miyazaki argues otherwise, stating that he only wishes to entertain. The successful cooperation on the creation of the manga and the film laid the foundation for other collaborative projects. In April 1984, Miyazaki opened his own office in Suginami Ward, naming it Nibariki.\n",
      "\n",
      "\n",
      "=== Studio Ghibli ===\n",
      "\n",
      "\n",
      "==== Early films (1985–1996) ====\n",
      "On June 15, 1985, Miyazaki and Takahata founded the animation production company Studio Ghibli as a subsidiary of Tokuma Shoten. Studio Ghibli's first film was Laputa: Castle in the Sky (1986), directed by Miyazaki. Some of the architecture in the film was also inspired by a Welsh mining town; Miyazaki witnessed the mining strike upon his first visit to Wales in 1984 and admired the miners' dedication to their work and community. Laputa was released on August 2, 1986, by the Toei Company. It sold around 775,000 tickets; Miyazaki and Suzuki expressed their disappointment with the film's box office figures. Miyazaki's following film, My Neighbor Totoro, was released alongside Takahata's Grave of the Fireflies in April 1988 to ensure Studio Ghibli's financial status. My Neighbor Totoro features the theme of the relationship between the environment and humanity, showing that harmony is the result of respecting the environment. While the film received critical acclaim, it was commercially unsuccessful at the box office. However, merchandising was successful, and the film was labeled as a cult classic.\n",
      "In 1987, Studio Ghibli acquired the rights to create a film adaptation of Eiko Kadono's novel Kiki's Delivery Service. Miyazaki's work on My Neighbor Totoro prevented him from directing the adaptation; Sunao Katabuchi was chosen as director, and Nobuyuki Isshiki was hired as script writer. Miyazaki's dissatisfaction of Isshiki's first draft led him to make changes to the project, ultimately taking the role of director. Kadono was unhappy with the differences between the book and the screenplay. Miyazaki and Suzuki visited Kadono and invited her to the studio; she allowed the project to continue. The film was originally intended to be a 60-minute special, but expanded into a feature film after Miyazaki completed the storyboards and screenplay. Kiki's Delivery Service premiered on July 29, 1989. It earned ¥2.15 billion at the box office, and was the highest-grossing film in Japan in 1989.\n",
      "From March to May 1989, Miyazaki's manga Hikōtei Jidai was published in the magazine Model Graphix. Miyazaki began production on a 45-minute in-flight film for Japan Airlines based on the manga; Suzuki ultimately extended the film into the feature-length film, titled Porco Rosso, as expectations grew. The outbreak of the Yugoslav Wars in 1991 affected Miyazaki, prompting a more sombre tone for the film; Miyazaki would later refer to the film as \"foolish\", as its mature tones were unsuitable for children. The film featured anti-war themes, which Miyazaki would later revisit. The airline remained a major investor in the film, resulting in its initial premiere as an in-flight film, prior to its theatrical release on July 18, 1992. The film was commercially successful and remained one of the highest-grossing films in Japan for several years.\n",
      "Studio Ghibli set up its headquarters in Koganei, Tokyo in August 1992. In November 1992, two television spots directed by Miyazaki were broadcast by Nippon Television Network (NTV): Sora Iro no Tane, a 90-second spot adapted from the illustrated story Sora Iro no Tane by Rieko Nakagawa and Yuriko Omura; and Nandarou, a series of five advertisements featuring an undefinable creature. Miyazaki designed the storyboards and wrote the screenplay for Whisper of the Heart (1995), directed by Yoshifumi Kondō.\n",
      "\n",
      "\n",
      "==== Global emergence (1997–2008) ====\n",
      "Miyazaki began work on the initial storyboards for Princess Mononoke in August 1994, based on preliminary thoughts and sketches from the late 1970s. While experiencing writer's block during production, Miyazaki accepted a request for the creation of On Your Mark, a music video for the song of the same name by Chage and Aska. In the production of the video, Miyazaki experimented with computer animation to supplement traditional animation. On Your Mark premiered as a short before Whisper of the Heart. Despite the video's popularity, Suzuki said that it was not given \"100 percent\" focus.\n",
      "\n",
      "In May 1995, Miyazaki took a group of artists and animators to the ancient forests of Yakushima and the mountains of Shirakami-Sanchi, taking photographs and making sketches. The landscapes in the film were inspired by Yakushima. In Princess Mononoke, Miyazaki revisited the ecological and political themes of Nausicaä of the Valley of the Wind. Miyazaki supervised the 144,000 cels in the film, about 80,000 of which were key animation. Princess Mononoke was produced with an estimated budget of ¥2.35 billion (approximately US$23.5 million), making it the most expensive Japanese animated film at the time. Approximately fifteen minutes of the film uses computer animation: about five minutes uses techniques such as 3D rendering, digital composition, and texture mapping; the remaining ten minutes uses digital ink and paint. While the original intention was to digitally paint 5,000 of the film's frames, time constraints doubled this, though it remained below ten percent of the final film.\n",
      "Upon its premiere on July 12, 1997, Princess Mononoke was critically acclaimed, becoming the first animated film to win the Japan Academy Film Prize for Picture of the Year. The film was also commercially successful, becoming the highest-grossing film in Japan for several months. Miramax Films purchased the film's distributions rights for North America; while it was largely unsuccessful at the box office, grossing about US$2.3 million, it was seen as the introduction of Studio Ghibli to global markets. Miyazaki claimed Princess Mononoke would be his final film. Tokuma Shoten merged with Studio Ghibli in June 1997. Miyazaki left Studio Ghibli on January 14, 1998, to create a new studio called Butaya, to be succeeded by Kondō; however, Kondō's death impacted Miyazaki, and he returned to Studio Ghibli on January 16, 1999.\n",
      "Miyazaki's next film was conceived while on vacation at a mountain cabin with his family and five young girls who were family friends. Miyazaki realized that he had not created a film for 10-year-old girls, and set out to do so. He read shōjō manga magazines like Nakayoshi and Ribon for inspiration, but felt they only offered subjects on \"crushes and romance\", which is not what the girls \"held dear in their hearts\". He decided to produce the film about a female heroine whom they could look up to. Production of the film, titled Spirited Away, commenced in 2000 on a budget of ¥1.9 billion (US$15 million). As with Princess Mononoke, the staff experimented with computer animation, but kept the technology at a level to enhance the story, not to \"steal the show\". Spirited Away deals with symbols of human greed, symbolizing the 1980s Japanese asset price bubble, and a liminal journey through the realm of spirits. The film was released on July 20, 2001; it received critical acclaim, and is considered among the greatest films of the 2000s. It won the Japan Academy Film Prize for Picture of the Year, and the Academy Award for Best Animated Feature. The film was also commercially successful, earning ¥30.4 billion (US$289.1 million) at the box office. It became the highest-grossing film in Japan, a record it maintained for almost 20 years. Following the death of Tokuma in September 2000, Miyazaki served as the head of his funeral committee.\n",
      "In September 2001, Studio Ghibli announced the production of Howl's Moving Castle, based on the novel by Diana Wynne Jones. Mamoru Hosoda of Toei Animation was originally selected to direct the film, but disagreements between Hosoda and Studio Ghibli executives led to the project's abandonment. After six months, Studio Ghibli resurrected the project. Miyazaki was inspired to direct the film upon reading Jones' novel, and was struck by the image of a castle moving around the countryside; the novel does not explain how the castle moved, which led to Miyazaki's designs. He traveled to Colmar and Riquewihr in Alsace, France, to study the architecture and the surroundings for the film's setting. Additional inspiration came from the concepts of future technology in Albert Robida's work. It was released on November 20, 2004, and received widespread critical acclaim. The film received the Osella Award for Technical Excellence at the 61st Venice International Film Festival, and was nominated for the Academy Award for Best Animated Feature. In Japan, the film grossed a record $14.5 million in its first week of release. It remains among the highest-grossing films in Japan, with a worldwide gross of over ¥19.3 billion. Miyazaki received the honorary Golden Lion for Lifetime Achievement award at the 62nd Venice International Film Festival in 2005.\n",
      "In March 2005, Studio Ghibli split from Tokuma Shoten. In the 1980s, Miyazaki had contacted Ursula K. Le Guin expressing interest in producing an adaptation of her Earthsea novels; unaware of Miyazaki's work, Le Guin declined. Upon watching My Neighbor Totoro several years later, Le Guin expressed approval to the concept of the adaptation. She met with Suzuki in August 2005, who wanted Miyazaki's son Goro to direct the film, as Miyazaki had wished to retire. Disappointed that Miyazaki was not directing, but under the impression that he would supervise his son's work, Le Guin approved of the film's production. Miyazaki later publicly opposed and criticized Gorō's appointment as director. Upon Miyazaki's viewing of the film, he wrote a message for his son: \"It was made honestly, so it was good\".\n",
      "Miyazaki designed the covers for several manga novels in 2006, including A Trip to Tynemouth; he also worked as editor, and created a short manga for the book. Miyazaki's next film, Ponyo, began production in May 2006. It was initially inspired by \"The Little Mermaid\" by Hans Christian Andersen, though began to take its own form as production continued. Miyazaki aimed for the film to celebrate the innocence and cheerfulness of a child's universe. He intended for it to only use traditional animation, and was intimately involved with the artwork. He preferred to draw the sea and waves himself, as he enjoyed experimenting. Ponyo features 170,000 frames—a record for Miyazaki. The film's seaside village was inspired by Tomonoura, a town in Setonaikai National Park, where Miyazaki stayed in 2005. The main character, Sōsuke, is based on Gorō. Following its release on July 19, 2008, Ponyo was critically acclaimed, receiving Animation of the Year at the 32nd Japan Academy Film Prize. The film was also a commercial success, earning ¥10 billion (US$93.2 million) in its first month and ¥15.5 billion by the end of 2008, placing it among the highest-grossing films in Japan.\n",
      "\n",
      "\n",
      "==== Later films (2009–present) ====\n",
      "\n",
      "In early 2009, Miyazaki began writing a manga called Kaze Tachinu (風立ちぬ, The Wind Rises), telling the story of Mitsubishi A6M Zero fighter designer Jiro Horikoshi. The manga was first published in two issues of the Model Graphix magazine, published on February 25 and March 25, 2009. Miyazaki later co-wrote the screenplay for Arrietty (2010) and From Up on Poppy Hill (2011), directed by Hiromasa Yonebayashi and Gorō Miyazaki respectively. Miyazaki wanted his next film to be a sequel to Ponyo, but Suzuki convinced him to instead adapt Kaze Tachinu to film. In November 2012, Studio Ghibli announced the production of The Wind Rises, based on Kaze Tachinu, to be released alongside Takahata's The Tale of the Princess Kaguya.\n",
      "Miyazaki was inspired to create The Wind Rises after reading a quote from Horikoshi: \"All I wanted to do was to make something beautiful\". Several scenes in The Wind Rises were inspired by Tatsuo Hori's novel The Wind Has Risen (風立ちぬ), in which Hori wrote about his life experiences with his fiancée before she died from tuberculosis. The female lead character's name, Naoko Satomi, was borrowed from Hori's novel Naoko (菜穂子). The Wind Rises continues to reflect Miyazaki's pacifist stance, continuing the themes of his earlier works, despite stating that condemning war was not the intention of the film. The film premiered on July 20, 2013, and received critical acclaim; it was named Animation of the Year at the 37th Japan Academy Film Prize, and was nominated for Best Animated Feature at the 86th Academy Awards. It was also commercially successful, grossing ¥11.6 billion (US$110 million) at the Japanese box office, becoming the highest-grossing film in Japan in 2013.\n",
      "In September 2013, Miyazaki announced that he was retiring from the production of feature films due to his age, but wished to continue working on the displays at the Studio Ghibli Museum. Miyazaki was awarded the Academy Honorary Award at the Governors Awards in November 2014. He developed Boro the Caterpillar, an animated short film which was first discussed during pre-production for Princess Mononoke. It was screened exclusively at the Studio Ghibli Museum in July 2017. Around this time, Miyazaki was working on a manga titled Teppo Samurai. In February 2019, a four-part documentary was broadcast on the NHK network titled 10 Years with Hayao Miyazaki, documenting production of his films in his private studio. In 2019, Miyazaki approved a musical adaptation of Nausicaä of the Valley of the Wind, as it was performed by a kabuki troupe.\n",
      "In August 2016, Miyazaki proposed a new feature-length film, Kimi-tachi wa Dō Ikiru ka (titled The Boy and the Heron in English), on which he began animation work without receiving official approval. The film opened in Japanese theaters on July 14, 2023. It was preceded by a minimal marketing campaign, forgoing trailers, commercials, and advertisements, a response from Suzuki to his perceived oversaturation of marketing materials in mainstream films. Despite claims that The Boy and the Heron would be Miyazaki's final film, Studio Ghibli vice president Junichi Nishioka said in September 2023 that Miyazaki continued to attend the office daily to plan his next film. Suzuki said he could no longer convince Miyazaki to retire. The Boy and the Heron won Miyazaki his second Academy Award for Best Animated Feature at the 96th Academy Awards, becoming the oldest director to do so; Miyazaki did not attend the show due to his advanced age.\n",
      "\n",
      "\n",
      "== Views ==\n",
      "\n",
      "Miyazaki has often criticized the state of the animation industry, stating that some animators lack a foundational understanding of their subjects and do not prioritize realism. He is particularly critical of Japanese animation, saying that anime is \"produced by humans who can't stand looking at other humans ... that's why the industry is full of otaku !\". He has frequently criticized otaku, including \"fanatics\" of guns and fighter aircraft, declaring it a \"fetish\" and refusing to identify himself as such. He bemoaned the state of Disney animated films in 1988, saying \"they show nothing but contempt for the audience\".\n",
      "In 2013, Miyazaki criticized Japanese Prime Minister Shinzo Abe's policies and the proposed Constitutional amendment that would allow Abe to revise the clause outlawing war as a means to settle international disputes. Miyazaki felt Abe wished to \"leave his name in history as a great man who revised the Constitution and its interpretation\", describing it as \"despicable\" and stating \"People who don't think enough shouldn't meddle with the constitution\". In 2015, Miyazaki disapproved Abe's denial of Japan's military aggression, stating Japan \"should clearly say that [they] inflicted enormous damage on China and express deep remorse over it\". He felt the government should give a \"proper apology\" to Korean comfort women who were forced to service the Japanese army during World War II and suggested the Senkaku Islands be \"split in half\" or controlled by both Japan and China. After the release of The Wind Rises in 2013, some online critics labeled Miyazaki a \"traitor\" and \"anti-Japanese\", describing the film as overly \"left-wing\"; Miyazaki recognized leftist values in his movies, citing his influence by and appreciation of communism as defined by Karl Marx, but criticized the Soviet Union's political system.\n",
      "In 2003, Miyazaki refused to attend the 75th Academy Awards in Hollywood in protest of the United States's involvement in the Iraq War, and later said he \"didn't want to visit a country that was bombing Iraq\". He did not publicly express this opinion at the request of his producer until 2009 when he lifted his boycott and attended San Diego Comic Con International as a favor to his friend John Lasseter. Miyazaki also expressed his opinion about the terrorist attack at the offices of the French satirical magazine Charlie Hebdo, criticizing the magazine's decision to publish the content cited as the catalyst for the incident; he felt caricatures should be made of politicians, not cultures. In November 2016, Miyazaki stated that he believed \"many of the people who voted for Brexit and Trump\" were affected by the increase in unemployment due to companies \"building cars in Mexico because of low wages and [selling] them in the US\". He did not think that Donald Trump would be elected president, calling it \"a terrible thing\", and said that Trump's political opponent Hillary Clinton was \"terrible as well\".\n",
      "\n",
      "\n",
      "== Themes ==\n",
      "Miyazaki's works are characterized by the recurrence of themes such as feminism, environmentalism, pacifism, love, and family. His narratives are also notable for not pitting a hero against an unsympathetic antagonist; Miyazaki felt Spirited Away's Chihiro \"manages not because she has destroyed the 'evil', but because she has acquired the ability to survive\".\n",
      "Miyazaki's films often emphasize environmentalism and the Earth's fragility. Margaret Talbot stated that Miyazaki dislikes modern technology, and believes much of modern culture is \"thin and shallow and fake\"; he anticipates a time with \"no more high-rises\". Miyazaki felt frustrated growing up in the Shōwa period from 1955 to 1965 because \"nature—the mountains and rivers—was being destroyed in the name of economic progress\". Peter Schellhase of The Imaginative Conservative identified that several antagonists of Miyazaki's films \"attempt to dominate nature in pursuit of political domination, and are ultimately destructive to both nature and human civilization\". Miyazaki is critical of exploitation under both communism and capitalism, as well as globalization and its effects on modern life, believing that \"a company is common property of the people that work there\". Ram Prakash Dwivedi identified values of Mahatma Gandhi in the films of Miyazaki.\n",
      "Several of Miyazaki's films feature anti-war themes. Daisuke Akimoto of Animation Studies categorized Porco Rosso as \"anti-war propaganda\" and felt the protagonist, Porco, transforms into a pig partly due to his extreme distaste of militarism. Akimoto also argues that The Wind Rises reflects Miyazaki's \"antiwar pacifism\", despite the latter stating that the film does not attempt to \"denounce\" war. Schellhase also identifies Princess Mononoke as a pacifist film due to the protagonist, Ashitaka; instead of joining the campaign of revenge against humankind, as his ethnic history would lead him to do, Ashitaka strives for peace. David Loy and Linda Goodhew argue that both Nausicaä of the Valley of the Wind and Princess Mononoke do not depict traditional evil, but the Buddhist roots of evil: greed, ill will, and delusion; according to Buddhism, the roots of evil must transform into \"generosity, loving-kindness and wisdom\" in order to overcome suffering, and both Nausicaä and Ashitaka accomplish this. When characters in Miyazaki's films are forced to engage in violence, it is shown as being a difficult task; in Howl's Moving Castle, Howl is forced to fight an inescapable battle in defense of those he loves, and it almost destroys him, though he is ultimately saved by Sophie's love and bravery.\n",
      "Suzuki described Miyazaki as a feminist in reference to his attitude to female workers. Miyazaki has described his female characters as \"brave, self-sufficient girls that don't think twice about fighting for what they believe in with all their heart\", stating that they may \"need a friend, or a supporter, but never a saviour\" and that \"any woman is just as capable of being a hero as any man\". Nausicaä of the Valley of the Wind was lauded for its positive portrayal of women, particularly protagonist Nausicaä. Schellhase noted that the female characters in Miyazaki's films are not objectified or sexualized, and possess complex and individual characteristics absent from Hollywood productions. Schellhase also identified a \"coming of age\" element for the heroines in Miyazaki's films, as they each discover \"individual personality and strengths\". Gabrielle Bellot of The Atlantic wrote that, in his films, Miyazaki \"shows a keen understanding of the complexities of what it might mean to be a woman\". In particular, Bellot cites Nausicaä of the Valley of the Wind, praising the film's challenging of gender expectations, and the strong and independent nature of Nausicaä. Bellot also noted that Princess Mononoke's San represents the \"conflict between selfhood and expression\".\n",
      "Miyazaki is concerned with the sense of wonder in young people, seeking to maintain themes of love and family in his films. Michael Toscano of Curator found that Miyazaki \"fears Japanese children are dimmed by a culture of overconsumption, overprotection, utilitarian education, careerism, techno-industrialism, and a secularism that is swallowing Japan's native animism\". Schellhase wrote that several of Miyazaki's works feature themes of love and romance, but felt emphasis is placed on \"the way lonely and vulnerable individuals are integrated into relationships of mutual reliance and responsibility, which generally benefit everyone around them\". He also found that many of the protagonists in Miyazaki's films present an idealized image of families, whereas others are dysfunctional.\n",
      "\n",
      "\n",
      "== Creation process and influences ==\n",
      "Miyazaki forgoes traditional screenplays in his productions, instead developing the film's narrative as he designs the storyboards. \"We never know where the story will go but we just keep working on the film as it develops,\" he said. In each of his films, Miyazaki has employed traditional animation methods, drawing each frame by hand; computer-generated imagery has been employed in several of his later films, beginning with Princess Mononoke, to \"enrich the visual look\", though he ensures that each film can \"retain the right ratio between working by hand and computer ... and still be able to call my films 2D\". He oversees every frame of his films. For character designs, Miyazaki draws original drafts used by animation directors to create reference sheets, which are then corrected by Miyazaki in his style.\n",
      "Miyazaki has cited several Japanese artists as his influences, including Sanpei Shirato, Osamu Tezuka, Soji Yamakawa, and Isao Takahata. A number of Western authors have also influenced his works, including Frédéric Back, Lewis Carroll, Roald Dahl, Jean Giraud, Paul Grimault, Ursula K. Le Guin, and Yuri Norstein, as well as animation studio Aardman Animations (specifically the works of Nick Park). Specific works that have influenced Miyazaki include Animal Farm (1945), The Snow Queen (1957), and The King and the Mockingbird (1980); The Snow Queen is said to be the true catalyst for Miyazaki's filmography, influencing his training and work. When animating young children, Miyazaki often takes inspiration from his friends' children, as well as memories of his own childhood.\n",
      "\n",
      "\n",
      "== Personal life ==\n",
      "\n",
      "Miyazaki married fellow animator Akemi Ōta in October 1965; the two had met while colleagues at Toei Animation. The couple have two sons: Goro, born in January 1967, and Keisuke, born in April 1969. Miyazaki felt that becoming a father changed him, as he tried to produce work that would please his children. Miyazaki initially fulfilled a promise to his wife that they would both continue to work after Goro's birth, dropping him off at preschool for the day; however, upon seeing Goro's exhaustion walking home one day, Miyazaki decided that they could not continue, and his wife stayed at home to raise their children. Miyazaki's dedication to his work harmed his relationship with his children, as he was often absent. Goro watched his father's works in an attempt to \"understand\" him, since the two rarely talked. Miyazaki said that he \"tried to be a good father, but in the end [he] wasn't a very good parent\". During the production of Tales from Earthsea in 2006, Goro said that his father \"gets zero marks as a father but full marks as a director of animated films\".\n",
      "Goro worked at a landscape design firm before beginning to work at the Ghibli Museum; he designed the garden on its rooftop and eventually became its curator. Keisuke studied forestry at Shinshu University and works as a wood artist; he designed a woodcut print that appears in Whisper of the Heart. Miyazaki's niece, Mei Okuyama, who was the inspiration behind the character Mei in My Neighbor Totoro, is married to animation artist Daisuke Tsutsumi.\n",
      "\n",
      "\n",
      "== Legacy ==\n",
      "Miyazaki was described as the \"godfather of animation in Japan\" by BBC's Tessa Wong in 2016, citing his craftsmanship and humanity, the themes of his films, and his inspiration to younger artists. Courtney Lanning of Arkansas Democrat-Gazette named him one of the world's greatest animators, comparing him to Osamu Tezuka and Walt Disney. Swapnil Dhruv Bose of Far Out Magazine wrote that Miyazaki's work \"has shaped not only the future of animation but also filmmaking in general\", and that it helped \"generation after generation of young viewers to observe the magic that exists in the mundane\". Richard James Havis of South China Morning Post called him a \"genius ... who sets exacting standards for himself, his peers and studio staff\". Paste's Toussaint Egan described Miyazaki as \"one of anime's great auteurs\", whose \"stories of such singular thematic vision and unmistakable aesthetic\" captured viewers otherwise unfamiliar with anime. Miyazaki became the subject of an exhibit at the Academy Museum of Motion Pictures in Los Angeles in 2021, featuring over 400 objects from his films.\n",
      "Miyazaki has frequently been cited as an inspiration to numerous animators, directors and writers around the world, including Wes Anderson, James Cameron, Dean DeBlois, Guillermo del Toro, Pete Docter, Mamoru Hosoda, Bong Joon-ho, Travis Knight, John Lasseter, Nick Park, Henry Selick, Makoto Shinkai, and Steven Spielberg. Glen Keane said Miyazaki is a \"huge influence\" on Walt Disney Animation Studios and has been \"part of our heritage\" ever since The Rescuers Down Under (1990). The Disney Renaissance era was also prompted by competition with the development of Miyazaki's films. Artists from Pixar and Aardman Studios signed a tribute stating, \"You're our inspiration, Miyazaki-san!\" He has also been cited as inspiration for video game designers including Shigeru Miyamoto on The Legend of Zelda and Hironobu Sakaguchi on Final Fantasy, as well as the television series Avatar: The Last Airbender, and the video game Ori and the Blind Forest (2015).\n",
      "Studio Ghibli has searched for some time for Miyazaki and Suzuki's successor to lead the studio; Kondō, the director of Whisper of the Heart, was initially considered, but died from a sudden heart attack in 1998. Some candidates were considered by 2023—including Miyazaki's son Goro, who declined—but the studio was not able to find a successor.\n",
      "\n",
      "\n",
      "== Selected filmography ==\n",
      "\n",
      "The Castle of Cagliostro (1979)\n",
      "Nausicaä of the Valley of the Wind (1984)\n",
      "Laputa: Castle in the Sky (1986)\n",
      "My Neighbor Totoro (1988)\n",
      "Kiki's Delivery Service (1989)\n",
      "Porco Rosso (1992)\n",
      "Princess Mononoke (1997)\n",
      "Spirited Away (2001)\n",
      "Howl's Moving Castle (2004)\n",
      "Ponyo (2008)\n",
      "The Wind Rises (2013)\n",
      "The Boy and the Heron (2023)\n",
      "\n",
      "\n",
      "== Awards and nominations ==\n",
      "\n",
      "Miyazaki won the Ōfuji Noburō Award at the Mainichi Film Awards for The Castle of Cagliostro (1979), Nausicaä of the Valley of the Wind (1984), Laputa: Castle in the Sky (1986), and My Neighbor Totoro (1988), and the Mainichi Film Award for Best Animation Film for Kiki's Delivery Service (1989), Porco Rosso (1992), Princess Mononoke (1997), Spirited Away (2001), and Whale Hunt (2001). Spirited Away and The Boy and the Heron were awarded the Academy Award for Best Animated Feature, while Howl's Moving Castle (2004) and The Wind Rises (2013) received nominations. He was named a Person of Cultural Merit by the Japanese government in November 2012, for outstanding cultural contributions. In 2024, Time named him one of the 100 most influential people in the world, and Gold House honored him on its Most Impactful Asians A100 list. His other accolades include several Annie Awards, Japan Academy Film Prizes, Kinema Junpo Awards, and Tokyo Anime Awards.\n",
      "\n",
      "\n",
      "== Notes ==\n",
      "\n",
      "\n",
      "== References ==\n",
      "\n",
      "\n",
      "== Sources ==\n",
      "\n",
      "\n",
      "== External links ==\n",
      "\n",
      "Studio Ghibli (in Japanese)\n",
      "Hayao Miyazaki  at Anime News Network's encyclopedia\n",
      "Hayao Miyazaki at IMDb\n",
      "Hayao Miyazaki at Library of Congress, with 14 library catalogue records\n",
      "\u001b[0m> Running step 015c82f1-c7ff-4de0-9930-ab2467424c1c. Step input: None\n",
      "\u001b[1;3;38;5;200mThought: I have found detailed information about Hayao Miyazaki, his works, and his life in Tokyo. Now, I can provide a summary of the relevant details related to Tokyo and his movies like \"Spirited Away.\"\n",
      "Answer: Hayao Miyazaki, a renowned Japanese animator, filmmaker, and manga artist, was born in Tokyo City, Japan. He expressed interest in manga and animation from a young age and joined Toei Animation in 1963. Miyazaki has contributed to various notable films and series, including \"The Castle of Cagliostro,\" \"Princess Mononoke,\" \"Spirited Away,\" and more. He co-founded Studio Ghibli in 1985, where he directed several successful films like \"My Neighbor Totoro,\" \"Kiki's Delivery Service,\" and \"Porco Rosso.\" His films often explore themes such as humanity's relationship with nature, the importance of art and craftsmanship, and the challenges of maintaining pacifism in a violent world.\n",
      "\n",
      "One of Miyazaki's most famous works, \"Spirited Away,\" became the highest-grossing film in Japanese history and won the Academy Award for Best Animated Feature. The film is known for its rich storytelling and captivating animation. Miyazaki's works are characterized by strong female protagonists, morally ambiguous antagonists, and themes of environmentalism, love, and family. His films have received critical acclaim and commercial success, influencing a generation of animators and filmmakers worldwide.\n",
      "\n",
      "Miyazaki's legacy extends beyond his films, as he has been recognized for his craftsmanship, thematic depth, and influence on the animation industry. His dedication to hand-drawn animation and storytelling has inspired numerous artists and filmmakers globally.\n",
      "\u001b[0m\u001b[33mtrip_specialist\u001b[0m (to chat_manager):\n",
      "\n",
      "Hayao Miyazaki, a renowned Japanese animator, filmmaker, and manga artist, was born in Tokyo City, Japan. He expressed interest in manga and animation from a young age and joined Toei Animation in 1963. Miyazaki has contributed to various notable films and series, including \"The Castle of Cagliostro,\" \"Princess Mononoke,\" \"Spirited Away,\" and more. He co-founded Studio Ghibli in 1985, where he directed several successful films like \"My Neighbor Totoro,\" \"Kiki's Delivery Service,\" and \"Porco Rosso.\" His films often explore themes such as humanity's relationship with nature, the importance of art and craftsmanship, and the challenges of maintaining pacifism in a violent world.\n",
      "\n",
      "One of Miyazaki's most famous works, \"Spirited Away,\" became the highest-grossing film in Japanese history and won the Academy Award for Best Animated Feature. The film is known for its rich storytelling and captivating animation. Miyazaki's works are characterized by strong female protagonists, morally ambiguous antagonists, and themes of environmentalism, love, and family. His films have received critical acclaim and commercial success, influencing a generation of animators and filmmakers worldwide.\n",
      "\n",
      "Miyazaki's legacy extends beyond his films, as he has been recognized for his craftsmanship, thematic depth, and influence on the animation industry. His dedication to hand-drawn animation and storytelling has inspired numerous artists and filmmakers globally.\n",
      "\n",
      "--------------------------------------------------------------------------------\n",
      "\u001b[32m\n",
      "Next speaker: Admin\n",
      "\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "chat_result = user_proxy.initiate_chat(\n",
    "    manager,\n",
    "    message=\"\"\"\n",
    "What can i find in Tokyo related to Hayao Miyazaki and its moveis like Spirited Away?.\n",
    "\"\"\",\n",
    ")"
   ]
  }
 ],
 "metadata": {
  "front_matter": {
   "description": "Integrate llamaindex agents with Autogen.",
   "tags": [
    "react",
    "llama index",
    "software engineering"
   ]
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
